package NGUYENMINHHIEU.SERIZABLEFILES.EXCERCISES;

import java.util.List;
import java.util.Vector;

import javax.swing.table.DefaultTableModel;

public class CONTROLLERS<T> {
    private MODELS<T> m_objModels;
    
    public CONTROLLERS(){
        m_objModels = new MODELS<T>();
    }
    
    public boolean WriteListObjects(T lisValue, 
            String resource, String fileName) throws Exception {
        return m_objModels.
                        WriteListObjectIntoFiles(lisValue, resource, fileName);
    }
    
    public T ReadListObjects(String resource, 
            String fileName) throws Exception {
        return m_objModels.
                        ReadListObjectIntoFiles(resource, fileName);
    }
    
    public DefaultTableModel getModelInfo(List<String> lisField, 
            List<Vector<String>> lisRows) throws Exception {
        return m_objModels.getModels(lisField, lisRows);
    }
}
